vcLinkNode
Link node is a node added to component's structure and is mainly used to define joints and other mechanisms of movement in a component.
See in: Overview
Module: vcCore
Parent: vcNode
Children -
Referenced by: vcComponent.createLink(), vcLinkJoint.ChildNode
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Dof | vcDof | R | Gets the degree-of-freedom (DOF) object that defines the joint properties of the node and its mechanism of movement. If joint type is fixed, Dof will be None. |
| JointType | vcJointType | RW | Gets or sets the node's joint type |
| Joints | list[vcLinkJoint] | R | Gets a list of link joints associated with this link node. Returns joints where this link is the vcLinkJoint.ChildNode |
| Offset | vcMatrixExpressionProperty | R | Gets the expression property that, when evaluated, returns the node's offset. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| createJoint | vcLinkJoint | vcLinkJointType type | Creates a new joint associated with this link.See moreParameters: type (vcLinkJointType): The type of joint to create. Returns: vcLinkJoint: The newly created joint. |
| createLink | vcLinkNode | String name | Creates a new child link node with the given name.See moreParameters: name (String): The name for the newly created link node. Exceptions: RuntimeError: When there is no license for Modeling API. ValueError: When given node name is empty or not unique. RuntimeError: When node hierarchy is locked. Returns: vcLinkNode: Newly created link node object. |
Example: Listen Joint Value Update Events
""" This example shows how to continuously check an event value in a while loop. DISCLAIMER: it's not often performance-wise recommended to rely on high interval based logic if not necessary. """ import vcCore as vc async def OnRun(): comp = vc.getComponent() x_link = comp.findNode("X_link") while True: await x_link.OnNodeTransform.wait() # any vcEvent found in the API can be waited. if x_link.Dof.VALUE > 100: await delay(1) # on position, do some task